package org.pz.controller;

import org.pz.entity.MallResult;
import org.pz.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @RequestMapping("/findById")
    public MallResult findGoodsById(@RequestParam Integer id){
        return MallResult.success( goodsService.getGoodsById(id));
    }

}
